package com.heima.wemedia.controller;

import com.heima.model.wemeda.entity.WmUser;
import com.heima.wemedia.service.WmUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("add/user/fengin")
public class AddUserController {
    @Autowired
    private WmUserService wmUserService;

    @PostMapping
    public void save(@RequestBody WmUser wmUser) {
        wmUser.setType(1);
        wmUserService.insert(wmUser);
    }
}
